home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
101-125
/
disk_111
/
poplife
/
poplife.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
5KB
|
136 lines
/* ======================================================:ts=8============ */
PopLife PopLife PopLife PopLife PopLife PopLife PopLife PopLife
by Olaf /* KosmoSoft */ Seibert
Beek 5
5815 CS Merselo
The Netherlands
PopLife PopLife PopLife PopLife PopLife PopLife PopLife PopLife
/* ======================================================================= */
W H A T I S ` L I F E ' ? ?
Life is a sort of game, played with little one-cell beasties on a
rectangular grid. Sortof like your Amiga's screen! On this grid, the
cells (as the little animals are mostly referred to) live and die according
to some specific rules.
H O W A R E T H E S E R U L E S ? ?
First, the number of neighbour cells of each cell is counted. Every
cell exactly one place to the left, right, up and down is a neighbour,
and so are the cells that are next to the four corners of the cell (as if
every cell is square :-), so there can be up to eight neighbours.
Next, in one step, for every cell this number of neighbours is
examined. The following rules are then applied:
o If an existing cell has 2 or 3 neighbours, it will survive.
o If an empty space has exactly 3 neighbours, there will grow
a cell.
o Every other cell will die, and every other empty place will
remain empty.
Even though these rules seem to be simple, they can yield interesting
results. Try bringing your Workbench screen to life! Or maybe combine it
with a graphics program of some sort...
H O W T O U S E P O P L I F E
You start PopLife by typing
o run popcli -or- run popcli >nil:
o run popcli 1 -or- run popcli >nil: 1
from a CLI, or you can double-click the provided icon from the Workbench.
Doesn't it look like a CLI window with some Life in it ??
Normally, PopLife uses the blitter to generate. This is very fast,
but takes a temporary memory area of FIVE bitplanes as large as your screen.
As an alternative, if not enough memory is available, there is a routine
which uses only one temporary bitplane, but which is slower, since it only
uses the processor to do the work on 32 bits simultaneously.
You can force PopLife to use the slow, memory-efficient routine
by giving PopLife a 1 as an argument. Note that this is NOT possible
from the Workbench.
PopLife has three command keys associated with it. The initial
greeting message will point these out to you. < For Workbench users: the
window in which the message is will disappear after a delay of ten seconds.
To make it go away sooner, hit the return key. >
A more complete description follows here.
Left Amiga F6
This prepares PopLife for further action. It looks which screen is
the frontmost, and subsequently uses this screen for its activities,
until PopLife is de-activated again.
PopLife also allocates some working memory that is needed for the
blitter. This is 100 K of Chip memory, if you PopLife a 640 x 256 Workbench
screen.
If you press Left Amiga F6 again, PopLife deallocates this memory
and forgets about the screen. You should do this BEFORE the screen is closed.
PopLife can not detect such a thing automagically, and won't because of
speed, even if it could (and I _do_ know it is possible to some extent).
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING: NOT DE-ACTIVATING POPLIFE BEFORE THE SCREEN IS CLOSED WILL
CERTAINLY CRASH THE SYSTEM if you want a new generation.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Left Amiga F7
If PopLife is initialised, it will also react to its other
keystrokes. With F7 PopLife will generate the next generation of cells and
display these on the active screen. This will ruin any text or Workbench
windows and icons, but try it anyway.
Left Amiga F8
This keystroke will make PopLife generate new generations at full
speed. The last time I checked, it did about 6.8 generations per second on
a 640 x 256 Workbench screen.
To stop, you can press the same Left Amiga F8 again. You can also
use the Deactivate keystroke, PopLife will stop AND de-activate, as described
above.
SIGBREAKF_CTRL_C
To get rid of PopLife entirely, you may do one of the following
things:
From the CLI: Type PopLife again. This new PopLife announces that
it will terminate the other PopLife, as it actually does. You may also use
the AmigaDOG BREAK command to send it a Control-C. (BREAK <cli number>)
From the Workbench: Double-click on the PopLife icon again. This
newly started PopLife announces that it will terminate the other PopLife,
as it actually does.
C R E D I T S
I must give credit to the following persons, whose programs I have
ripped apart and put together:
Tomas Rokicki (was 781@navajo.STANFORD.EDU), for the blitter Life
routines. By the way, I found it necessary to clean them up a little, AND TO
WRITE SOME DOCUMENTATION. Look at the comments in the source.
The (to me) unknown author of the PDP-11 (I wish I had one) version
of the assembler routine.
John Toebes, 235 Trillingham Ln, Cary, NC 27511, USA. He wrote
PopCLI II, which gave me the idea and a lot of his code I am using here.
Olaf Seibert (Kosmos Software) <me> who has thrown code of the above
mentioned persons together, and who actually wrote some of his own!
Anyone who thinks this program is shareware, can send some small amount of
$$ (not $$$) to Olaf Seibert, Beek 5, 5815 CS Merselo, The Netherlands.
Of course, I didn't mention shareware anywhere.